package com.sanadc.shohdi.chapter2.student_report;




public class Student
{
	protected TestScore[] testScores;
	protected String name;
	
	
	
	public Student (String prmName,TestScore[] prmTestScores)
	{
		name = prmName;
		testScores = prmTestScores;
	}
	
	
	public String getName ()
	{
		return name;
	}
	
	public TestScore[] getTestScores()
	{
		return testScores;
	}
	
	
	public int getAverage()
	{
		int total = 0;
		for (int i=0;i<testScores.length;i++)
		{
			total += testScores[i].getPercentCorrect();
			
		}
		
		return total / testScores.length;
	}

}